//
//  JDCountryCollectionViewCell.swift
//  DragonWallet
//
//  Created by volantPig on 2024/4/10.
//

import UIKit

class JDCountryCollectionViewCell: UICollectionViewCell {
    
    var countryImgV: UIImageView?
    var countryName: UILabel?
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.setupUIElements()
    }
    
    func setupUIElements() {
        
        self.countryName = UILabel()
        self.contentView.addSubview(self.countryName!)
        self.countryName?.snp.makeConstraints({ make in
            make.centerX.equalTo(self.contentView)
            make.bottom.equalTo(self.contentView).offset(-14)
            make.height.equalTo(18)
        })
        self.countryName?.labelConfig(textAlignment: .center, font: UIFont.systemFont(ofSize: 13, weight: .regular), textColor: color("#333333"))
        self.countryName?.text = "国家"
        
        
        self.countryImgV = UIImageView()
        self.contentView.addSubview(self.countryImgV!)
        self.countryImgV?.snp.makeConstraints({ make in
            make.centerX.equalTo(self.contentView)
            make.bottom.equalTo(self.countryName!.snp.top).offset(-6)
            make.size.equalTo(CGSize(width: 50, height: 50))
        })
        self.countryImgV?.makeCorner(25)
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
